<div class="contents">
  <ol class="breadcrumb">
    <li><a href="#/index/panel">首页</a></li>
    <li><a href="#/user/list">管理员列表</a></li>
    <li class="active">{{id ? "编辑管理员" : "新增管理员"}}</li>
  </ol>
  <form class="form-horizontal" role="form" name="form" ng-submit="save()" novalidate>
    <div class="form-group" ng-class="{'has-error':form.userNickname.$invalid}">
      <label class="col-sm-2 control-label">登陆名</label>
      <div class="col-sm-5">
        <div ng-show="id" class="form-control-text">{{item.userNickname}}</div>
        <input type="text" class="form-control" placeholder="登陆名" name="userNickname" ng-model="item.userNickname" required="required" ng-show="!id">
      </div>
    </div>
    <div class="form-group" >
      <label class="col-sm-2 control-label" >所属部门</label>
      <div class="col-sm-5" >
        <input  type="text" class="form-control" placeholder="请在右侧树形菜单选择" name="parentUserName" ng-model="item.parentUserName" disabled="disabled"  >
      </div>
    </div>
    <div class="form-group" >
      <label class="col-sm-2 control-label" >部门负责人</label>
      <div class="col-sm-5" >
        <input  type="text" class="form-control" placeholder="请在右侧树形菜单选择" name="deptHeadName" ng-model="item.deptHeadName" disabled="disabled"  >
      </div>
    </div>
    <div class="form-group" >
      <label class="col-sm-2 control-label" >公有池名单 </label>
      <div class="col-sm-5" >
        <input  type="text" class="form-control" placeholder="请在右侧树形菜单选择" name="publicDeptHeadName" ng-model="item.publicDeptHeadName" disabled="disabled"  >
      </div>
    </div>
    <div class="form-group" ng-class="{'has-error':form.deptflag.$invalid}">
      <label class="col-sm-2 control-label">部门/人员</label>
      <div class="col-sm-5">
        <div class="radio-inline">
          <input type="radio" name="deptflag" ng-model="item.deptflag" value="0" required="required">部门
        </div>
        <div class="radio-inline">
          <input type="radio" name="deptflag" ng-model="item.deptflag" value="1" required="required">人员
        </div>
      </div>
    </div>
    <div class="form-group" ng-class="{'has-error':form.username.$invalid}">
      <label class="col-sm-2 control-label">真实姓名</label>
      <div class="col-sm-5">
        <div ng-show="id" class="form-control-text">{{item.username}}</div>
        <input type="text" class="form-control" placeholder="真实姓名" name="username" ng-model="item.username" required="required" ng-show="!id">
      </div>
    </div>

    <!--添加时显示，-->
    <div class="form-group" ng-class="{'has-error':form.password.$invalid}" ng-if="!id">
      <label class="col-sm-2 control-label">密码</label>
      <div class="col-sm-5">
        <input type="password" class="form-control" placeholder="密码" value="10" name="password" ng-model="item.password" required="required">
      </div>
    </div>
    <!--修改时显示，若输入则改密码-->
    <div class="form-group" ng-class="{'has-error':form.password.$invalid}" ng-if="id">
      <label class="col-sm-2 control-label">密码</label>
      <div class="col-sm-5">
        <input type="password" class="form-control" placeholder="密码" value="10" name="password" ng-model="item.password">
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.telePhone.$invalid}">
      <label class="col-sm-2 control-label">手机</label>
      <div class="col-sm-5">
        <input type="number" class="form-control" placeholder="手机" value="10" name="telePhone" ng-model="item.telePhone" required="required">
      </div>
    </div>
    <div class="form-group" ng-class="{'has-error':form.email.$invalid}">
      <label class="col-sm-2 control-label">邮箱</label>
      <div class="col-sm-5">
        <input type="email" class="form-control" placeholder="邮箱" value="" name="email" ng-model="item.email" required="required">
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error':form.remark.$invalid}">
      <label class="col-sm-2 control-label">备注</label>
      <div class="col-sm-5">
        <input type="text" class="form-control" placeholder="备注" value="10" name="remark" ng-model="item.remark"  >
      </div>
    </div>
    <div class="form-group" ng-class="{'has-error':form.status.$invalid}">
      <label class="col-sm-2 control-label">状态</label>
      <div class="col-sm-5">
        <select class="form-control" name="status" ng-model="item.status" ng-options="m.value as m.text for m in dictMap['userStatusModel']" required="required"> </select>
      </div>
    </div>
    <div class="form-group">
      <label class="col-sm-2 control-label">选择角色</label>
      <div class="col-sm-8">
        <label ng-repeat="role in roleList" style="float:left;width:230px;">
          <input type="checkbox" name="actionId" value="{{role.groupId}}" ng-model="allRoles[role.groupId]">{{role.groupName}}
        </label>
      </div>
    </div>
    <div class="form-group">
      <div class="col-sm-offset-2 col-sm-5">
        <button type="submit" class="btn btn-default">提交</button>
      </div>
    </div>
  </form>
</div>
<div class="" style="    width: 50%;
    overflow-x: auto;
    position: absolute;
    top: 20%;
    left: 74%;
    z-index: 999;">
  <select ng-model="selectedName" ng-init="selectedName = 1">
    <option value="1" >选择部门菜单</option>
    <option value="2">选择负责人菜单</option>
    <option value="3">选择公有池名单</option>
  </select>
  <ul id="treeDemo" class="ztree"></ul>
</div>
<div load-script src="'/static/jquery.jUploader-1.01.js?5'" call-back="" charset="utf-8" ></div>

